/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020.
 * Description: add support for linear irq mapping
 * Author: fuxiancheng
 * Create: 2020/10/29
 */

#include <linux/module.h>
#include <linux/of_irq.h>

static int __init map_interrupt_in_dts(void)
{
	struct device_node *np = NULL;
	int num_irq, index;

	for_each_of_allnodes(np) {
		num_irq = of_irq_count(np);
		if (!num_irq)
			continue;
		for (index = 0; index < num_irq; index++)
			if (of_irq_get(np, index) <= 0)
				break;
	}

	return 0;
}
late_initcall(map_interrupt_in_dts);
